Skip to content

Conversation

@guitargeek
Copy link
Contributor

Remove the headers ccomplex, cstdalign, cstdbool, and ctgmath from the module maps. They are deprecated since C++17 and should not be included anymore by ROOT or its users, as C++17 is the minimum supported C++ standard.

This fixes build warnings that can be seen in the CI when building with GCC 15, for example on Fedora 42:

[ 47%] Generating G__Core.cxx, ../lib/Core.pcm
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:5:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/ccomplex:51:4: warning: "<ccomplex> is deprecated in C++17, use <complex> instead" [-W#warnings]
 # warning "<ccomplex> is deprecated in C++17, use <complex> instead"
   ^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:23:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/cstdalign:50:6: warning: "<cstdalign> is deprecated in C++17, remove the #include" [-W#warnings]
 #   warning "<cstdalign> is deprecated in C++17, remove the #include"
     ^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:25:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/cstdbool:50:6: warning: "<cstdbool> is deprecated in C++17, remove the #include" [-W#warnings]
 #   warning "<cstdbool> is deprecated in C++17, remove the #include"
     ^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:30:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/ctgmath:50:6: warning: "<ctgmath> is deprecated in C++17, use <complex> or <cmath> instead" [-W#warnings]
 #   warning "<ctgmath> is deprecated in C++17, use <complex> or <cmath> instead"

@guitargeek guitargeek self-assigned this Jan 4, 2026
@guitargeek guitargeek requested a review from bellenot as a code owner January 4, 2026 10:26
@guitargeek guitargeek requested a review from dpiparo as a code owner January 4, 2026 10:26
@guitargeek guitargeek added the clean build Ask CI to do non-incremental build on PR label Jan 4, 2026
@dpiparo dpiparo requested review from devajithvs and hahnjo January 4, 2026 10:34
@dpiparo
Copy link
Member

dpiparo commented Jan 4, 2026

I added @hahnjo and @devajithvs to the reviewers.

@guitargeek
Copy link
Contributor Author

Thanks! Note that there is one more warning about a non-standard header in C++20, but I don't know what we can do about that since still have to support C++17:

While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:12:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/ciso646:49:6: warning: "<ciso646> is not a standard header since C++20, use <version> to detect implementation-specific macros" [-W#warnings]
#    warning "<ciso646> is not a standard header since C++20, use <version> to detect implementation-specific macros"

Can we also do something about that?

@github-actions
Copy link

github-actions bot commented Jan 4, 2026

Test Results

    22 files      22 suites   3d 17h 45m 57s ⏱️
 3 791 tests  3 791 ✅ 0 💤 0 ❌
80 314 runs  80 314 ✅ 0 💤 0 ❌

Results for commit 37ee619.

♻️ This comment has been updated with latest results.

@hahnjo
Copy link
Member

hahnjo commented Jan 9, 2026

Thanks! Note that there is one more warning about a non-standard header in C++20, but I don't know what we can do about that since still have to support C++17:

[...]

Can we also do something about that?

I guess you can try requires !cplusplus20, that should only build the module with C++17 because later standards always define all previous versions.

@hahnjo hahnjo requested a review from vgvassilev January 9, 2026 07:54
Remove the headers `ccomplex`, `cstdalign`, `cstdbool`, and `ctgmath`
from the module maps. They are deprecated since C++17 and should not be
included anymore by ROOT or its users, as C++17 is the minimum supported
C++ standard.

This fixes build warnings that can be seen in the CI when building with
GCC 15, for example on Fedora 42:

```txt
[ 47%] Generating G__Core.cxx, ../lib/Core.pcm
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:5:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/ccomplex:51:4: warning: "<ccomplex> is deprecated in C++17, use <complex> instead" [-W#warnings]
 # warning "<ccomplex> is deprecated in C++17, use <complex> instead"
   ^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:23:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/cstdalign:50:6: warning: "<cstdalign> is deprecated in C++17, remove the #include" [-W#warnings]
 #   warning "<cstdalign> is deprecated in C++17, remove the #include"
     ^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:25:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/cstdbool:50:6: warning: "<cstdbool> is deprecated in C++17, remove the #include" [-W#warnings]
 #   warning "<cstdbool> is deprecated in C++17, remove the #include"
     ^
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:30:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/ctgmath:50:6: warning: "<ctgmath> is deprecated in C++17, use <complex> or <cmath> instead" [-W#warnings]
 #   warning "<ctgmath> is deprecated in C++17, use <complex> or <cmath> instead"
```
This is done to make the ruff linter happy.
@guitargeek
Copy link
Contributor Author

Thanks! Note that there is one more warning about a non-standard header in C++20, but I don't know what we can do about that since still have to support C++17:
[...]
Can we also do something about that?

I guess you can try requires !cplusplus20, that should only build the module with C++17 because later standards always define all previous versions.

Nice, that works!

Remove the `ciso646` header from the module maps. It is not part of the
C++20 standard, and should not be included anymore by ROOT or its users
if they compile ROOT with C++20 or higher.

Note that also higher C++ versions will also define the `cplusplus20`
variable, as newer standards always define all previous versions.

This fixes build warnings that can be seen in the CI when building with
GCC 15, for example on Fedora 42:

```txt
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:12:
/usr/lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/ciso646:49:6: warning: "<ciso646> is not a standard header since C++20, use <version> to detect implementation-specific macros" [-W#warnings]
 #   warning "<ciso646> is not a standard header since C++20, use <version> to detect implementation-specific macros"
```
@guitargeek guitargeek changed the title [modules] Remove headers deprecated in C++17 from the module maps [modules] Remove headers deprecated in C++17 and non-standard in C++20 from the module maps Jan 9, 2026
Copy link
Member

@hahnjo hahnjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@guitargeek guitargeek merged commit 6478dae into root-project:master Jan 13, 2026
30 checks passed
@guitargeek guitargeek deleted the deprecated_headers branch January 13, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean build Ask CI to do non-incremental build on PR in:C++ modules in:Cling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants